﻿Imports System
Imports Microsoft.VisualStudio.TestTools.UnitTesting
Imports ExtensionLibrary

''' <summary>
''' Tests the methods within the <see cref="DateTimeExtensions">DateTimeExtensions</see> class.
''' </summary>
''' <revisions>
'''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
''' </revisions>
<TestClass()> _
Public Class DateTimeExtensionsTest

  Private testContextInstance As TestContext

  ''' <summary>
  ''' Gets or sets the test context which provides information about and functionality for the current test run.
  ''' </summary>
  ''' <value>The test context.</value>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  Public Property TestContext() As TestContext
    Get
      Return testContextInstance
    End Get
    Set(ByVal value As TestContext)
      testContextInstance = value
    End Set
  End Property

#Region " ToHour"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.ToHour">ToHour</see> method.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> _
  Public Sub ToHourTest()
    Assert.AreEqual(New DateTime(2008, 6, 12, 11, 0, 0), New DateTime(2008, 6, 12, 11, 48, 52).ToHour)
  End Sub

#End Region

#Region " ToDODString"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.ToDODString">ToDODString</see> method where the time is not included.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub ToDODStringTest1()
    Assert.AreEqual("12-JUN-2008", New DateTime(2008, 6, 12, 11, 57, 52).ToDODString(False))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.ToDODString">ToDODString</see> method where the time is included.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub ToDODStringTest2()
    Assert.AreEqual("12-JUN-2008 11:57:52", New DateTime(2008, 6, 12, 11, 57, 52).ToDODString(True))
  End Sub

#Region " SubtractWeek"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.SubtractWeek">SubtractWeek</see> method specifying the number of weeks to subtract.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub SubtractWeek1()
    Assert.AreEqual(New DateTime(2008, 6, 5, 12, 12, 12), New DateTime(2008, 6, 12, 12, 12, 12).SubtractWeek(1))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.SubtractWeek">SubtractWeek</see> method without specifying the number of weeks to subtract.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub SubtractWeek2()
    Assert.AreEqual(New DateTime(2008, 6, 5, 12, 12, 12), New DateTime(2008, 6, 12, 12, 12, 12).SubtractWeek)
  End Sub

#End Region

#Region " SubtractMonth"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.SubtractMonth">SubtractMonth</see> method when a date in January is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub SubtractMonthTest1()
    Assert.AreEqual(DateSerial(2007, 12, 29), New DateTime(2008, 1, 29, 12, 12, 12).SubtractMonth)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.SubtractMonth">SubtractMonth</see> method where there are no special date considerations.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub SubtractMonthTest2()
    Assert.AreEqual(DateSerial(2008, 7, 29), New DateTime(2008, 8, 29, 12, 12, 12).SubtractMonth)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.SubtractMonth">SubtractMonth</see> method when a date after the 31st of the month is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub SubtractMonthTest3()
    Assert.AreEqual(DateSerial(2008, 6, 30), New DateTime(2008, 7, 31, 12, 12, 12).SubtractMonth)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.SubtractMonth">SubtractMonth</see> method when a March 31st is specified in a non leap year.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub SubtractMonthTest4()
    Assert.AreEqual(DateSerial(2007, 2, 28), New DateTime(2007, 3, 31, 12, 12, 12).SubtractMonth)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.SubtractMonth">SubtractMonth</see> method when a March 31st is specified in a leap year.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub SubtractMonthTest5()
    Assert.AreEqual(DateSerial(2008, 2, 29), New DateTime(2008, 3, 31, 12, 12, 12).SubtractMonth)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.SubtractMonth">SubtractMonth</see> method when a date in March (before the 28th) is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub SubtractMonthTest6()
    Assert.AreEqual(DateSerial(2008, 2, 15), New DateTime(2008, 3, 15, 12, 12, 12).SubtractMonth)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.SubtractMonth">SubtractMonth</see> method when a date before the 30th in a month that has 31 days is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub SubtractMonthTest7()
    Assert.AreEqual(DateSerial(2008, 6, 15), New DateTime(2008, 7, 15, 12, 12, 12).SubtractMonth)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.SubtractMonth">SubtractMonth</see> method when a date in April is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub SubtractMonthTest8()
    Assert.AreEqual(DateSerial(2008, 3, 15), New DateTime(2008, 4, 15, 12, 12, 12).SubtractMonth)
  End Sub

#End Region

#Region " SetTime"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.SetTime">SetTime</see> method specifing the hour, minute, second, and millisecond values.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub SetTimeTest1()
    Assert.AreEqual(New DateTime(2008, 6, 12, 12, 17, 20, 98), New DateTime(2008, 6, 12).SetTime(12, 17, 20, 98))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.SetTime">SetTime</see> method specifing the hour, minute, and second values.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub SetTimeTest2()
    Assert.AreEqual(New DateTime(2008, 6, 12, 12, 17, 20, 0), New DateTime(2008, 6, 12).SetTime(12, 17, 20))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.SetTime">SetTime</see> method specifing the hour and minute values.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub SetTimeTest3()
    Assert.AreEqual(New DateTime(2008, 6, 12, 12, 17, 0, 0), New DateTime(2008, 6, 12).SetTime(12, 17))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.SetTime">SetTime</see> method specifing only the hour value.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub SetTimeTest4()
    Assert.AreEqual(New DateTime(2008, 6, 12, 12, 0, 0, 0), New DateTime(2008, 6, 12).SetTime(12))
  End Sub

#End Region

#Region " Noon"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.Noon">Noon</see> method.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub NoonTest()
    Assert.AreEqual(New DateTime(2008, 6, 12, 12, 0, 0), New DateTime(2008, 6, 12).Noon)
  End Sub

#End Region

#Region " NextDayOfMonth"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.NextDayofMonth">NextDayOfMonth</see> method specifying Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub NextDayofMonthTest1()
    Assert.AreEqual(New DateTime(2008, 6, 15, 5, 25, 20), New DateTime(2008, 6, 12, 5, 25, 20).NextDayofMonth(System.DayOfWeek.Sunday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.NextDayofMonth">NextDayOfMonth</see> method specifying Monday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub NextDayofMonthTest2()
    Assert.AreEqual(New DateTime(2008, 6, 16, 5, 25, 20), New DateTime(2008, 6, 12, 5, 25, 20).NextDayofMonth(System.DayOfWeek.Monday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.NextDayofMonth">NextDayOfMonth</see> method specifying Tuesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub NextDayofMonthTest3()
    Assert.AreEqual(New DateTime(2008, 6, 17, 5, 25, 20), New DateTime(2008, 6, 12, 5, 25, 20).NextDayofMonth(System.DayOfWeek.Tuesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.NextDayofMonth">NextDayOfMonth</see> method specifying Wednesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub NextDayofMonthTest4()
    Assert.AreEqual(New DateTime(2008, 6, 18, 5, 25, 20), New DateTime(2008, 6, 12, 5, 25, 20).NextDayofMonth(System.DayOfWeek.Wednesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.NextDayofMonth">NextDayOfMonth</see> method specifying Thursday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub NextDayofMonthTest5()
    Assert.AreEqual(New DateTime(2008, 6, 19, 5, 25, 20), New DateTime(2008, 6, 12, 5, 25, 20).NextDayofMonth(System.DayOfWeek.Thursday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.NextDayofMonth">NextDayOfMonth</see> method specifying Friday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub NextDayofMonthTest6()
    Assert.AreEqual(New DateTime(2008, 6, 13, 5, 25, 20), New DateTime(2008, 6, 12, 5, 25, 20).NextDayofMonth(System.DayOfWeek.Friday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.NextDayofMonth">NextDayOfMonth</see> method specifying Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub NextDayofMonthTest7()
    Assert.AreEqual(New DateTime(2008, 6, 14, 5, 25, 20), New DateTime(2008, 6, 12, 5, 25, 20).NextDayofMonth(System.DayOfWeek.Saturday))
  End Sub

#End Region

#Region " Midnight"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.Midnight">Midnight</see> method.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub MidnightTest()
    Assert.AreEqual(New DateTime(2008, 6, 12, 0, 0, 0), New DateTime(2008, 6, 12, 12, 43, 50, 90).Midnight)
  End Sub

#End Region

#Region " LastWorkDayOfPreviousFiscalYear"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastWorkDayOfPreviousFiscalYear">LastWorkDayOfPreviousFiscalYear</see> method where the last calendar day of the previous fiscal year does not fall on either Saturday or Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastWorkDayOfPreviousFiscalYearTest1()
    Assert.AreEqual(New DateTime(2005, 9, 30), New DateTime(2006, 6, 12).LastWorkDayOfPreviousFiscalYear)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastWorkDayOfPreviousFiscalYear">LastWorkDayOfPreviousFiscalYear</see> method where the last calendar day of the previous fiscal year falls on a Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastWorkDayOfPreviousFiscalYearTest2()
    Assert.AreEqual(New DateTime(2006, 9, 29), New DateTime(2007, 6, 12).LastWorkDayOfPreviousFiscalYear)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastWorkDayOfPreviousFiscalYear">LastWorkDayOfPreviousFiscalYear</see> method where the last calendar day of the previous fiscal year falls on a Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastWorkDayOfPreviousFiscalYearTest3()
    Assert.AreEqual(New DateTime(2007, 9, 28), New DateTime(2008, 6, 12).LastWorkDayOfPreviousFiscalYear)
  End Sub

#End Region

#Region " LastWorkDayOfCurrentFiscalYear"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastWorkDayOfCurrentFiscalYear">LastWorkDayOfCurrentFiscalYear</see> method where the last calendar day of the fiscal year does not fall on either Saturday or Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastWorkDayOfCurrentFiscalYearTest1()
    Assert.AreEqual(New DateTime(2008, 9, 30), New DateTime(2008, 6, 12).LastWorkDayOfCurrentFiscalYear)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastWorkDayOfCurrentFiscalYear">LastWorkDayOfCurrentFiscalYear</see> method where the last calendar day of the fiscal year falls on Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastWorkDayOfCurrentFiscalYearTest2()
    Assert.AreEqual(New DateTime(2006, 9, 29), New DateTime(2006, 6, 12).LastWorkDayOfCurrentFiscalYear)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastWorkDayOfCurrentFiscalYear">LastWorkDayOfCurrentFiscalYear</see> method where the last calendar day of the fiscal year falls on Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastWorkDayOfCurrentFiscalYearTest3()
    Assert.AreEqual(New DateTime(2007, 9, 28), New DateTime(2007, 6, 12).LastWorkDayOfCurrentFiscalYear)
  End Sub

#End Region

#Region " LastDayOfWeek"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfWeek">LastDayOfWeek</see> method specifying a date that falls on Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfWeekTest1()
    Assert.AreEqual(New DateTime(2008, 6, 14), New DateTime(2008, 6, 8).LastDayOfWeek)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfWeek">LastDayOfWeek</see> method specifying a date that falls on Monday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfWeekTest2()
    Assert.AreEqual(New DateTime(2008, 6, 14), New DateTime(2008, 6, 9).LastDayOfWeek)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfWeek">LastDayOfWeek</see> method specifying a date that falls on Tuesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfWeekTest3()
    Assert.AreEqual(New DateTime(2008, 6, 14), New DateTime(2008, 6, 10).LastDayOfWeek)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfWeek">LastDayOfWeek</see> method specifying a date that falls on Wednesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfWeekTest4()
    Assert.AreEqual(New DateTime(2008, 6, 14), New DateTime(2008, 6, 11).LastDayOfWeek)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfWeek">LastDayOfWeek</see> method specifying a date that falls on Thursday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfWeekTest5()
    Assert.AreEqual(New DateTime(2008, 6, 14), New DateTime(2008, 6, 12).LastDayOfWeek)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfWeek">LastDayOfWeek</see> method specifying a date that falls on Friday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfWeekTest6()
    Assert.AreEqual(New DateTime(2008, 6, 14), New DateTime(2008, 6, 13).LastDayOfWeek)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfWeek">LastDayOfWeek</see> method specifying a date that falls on Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfWeekTest7()
    Assert.AreEqual(New DateTime(2008, 6, 14), New DateTime(2008, 6, 14).LastDayOfWeek)
  End Sub

#End Region

#Region " LastDayOfPreviousQuarter"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfPreviousQuarter">LastDayOfPreviousQuarter</see> method where a date in the first quarter of the calendar year is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfPreviousQuarterTest1()
    Assert.AreEqual(New DateTime(2007, 12, 31), New DateTime(2008, 2, 12).LastDayOfPreviousQuarter)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfPreviousQuarter">LastDayOfPreviousQuarter</see> method where a date in the second quarter of the calendar year is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfPreviousQuarterTest2()
    Assert.AreEqual(New DateTime(2008, 3, 31), New DateTime(2008, 5, 12).LastDayOfPreviousQuarter)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfPreviousQuarter">LastDayOfPreviousQuarter</see> method where a date in the third quarter of the calendar year is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfPreviousQuarterTest3()
    Assert.AreEqual(New DateTime(2008, 6, 30), New DateTime(2008, 8, 12).LastDayOfPreviousQuarter)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfPreviousQuarter">LastDayOfPreviousQuarter</see> method where a date in the fourth quarter of the calendar year is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfPreviousQuarterTest4()
    Assert.AreEqual(New DateTime(2008, 9, 30), New DateTime(2008, 11, 12).LastDayOfPreviousQuarter)
  End Sub

#End Region

#Region " LastDayOfMonth"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method where the day of week is not specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest1()
    Assert.AreEqual(New DateTime(2008, 6, 30), New DateTime(2008, 6, 12).LastDayOfMonth)
  End Sub

#Region " last day of month falls on Sunday"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Sunday where the last day of month falls on a Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest11()
    Assert.AreEqual(New DateTime(2008, 8, 31), New DateTime(2008, 8, 12).LastDayOfMonth(DayOfWeek.Sunday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Monday where the last day of month falls on a Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest12()
    Assert.AreEqual(New DateTime(2008, 8, 25), New DateTime(2008, 8, 12).LastDayOfMonth(DayOfWeek.Monday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Tuesday where the last day of month falls on a Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest13()
    Assert.AreEqual(New DateTime(2008, 8, 26), New DateTime(2008, 8, 12).LastDayOfMonth(DayOfWeek.Tuesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Wednesday where the last day of month falls on a Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest14()
    Assert.AreEqual(New DateTime(2008, 8, 27), New DateTime(2008, 8, 12).LastDayOfMonth(DayOfWeek.Wednesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Thursday where the last day of month falls on a Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest15()
    Assert.AreEqual(New DateTime(2008, 8, 28), New DateTime(2008, 8, 12).LastDayOfMonth(DayOfWeek.Thursday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Friday where the last day of month falls on a Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest16()
    Assert.AreEqual(New DateTime(2008, 8, 29), New DateTime(2008, 8, 12).LastDayOfMonth(DayOfWeek.Friday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Saturday where the last day of month falls on a Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest17()
    Assert.AreEqual(New DateTime(2008, 8, 30), New DateTime(2008, 8, 12).LastDayOfMonth(DayOfWeek.Saturday))
  End Sub

#End Region

#Region " last day of month falls on Monday"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Sunday where the last day of month falls on a Monday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest21()
    Assert.AreEqual(New DateTime(2008, 6, 29), New DateTime(2008, 6, 12).LastDayOfMonth(DayOfWeek.Sunday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Monday where the last day of month falls on a Monday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest22()
    Assert.AreEqual(New DateTime(2008, 6, 30), New DateTime(2008, 6, 12).LastDayOfMonth(DayOfWeek.Monday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Tuesday where the last day of month falls on a Monday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest23()
    Assert.AreEqual(New DateTime(2008, 6, 24), New DateTime(2008, 6, 12).LastDayOfMonth(DayOfWeek.Tuesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Wednesday where the last day of month falls on a Monday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest24()
    Assert.AreEqual(New DateTime(2008, 6, 25), New DateTime(2008, 6, 12).LastDayOfMonth(DayOfWeek.Wednesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Thursday where the last day of month falls on a Monday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest25()
    Assert.AreEqual(New DateTime(2008, 6, 26), New DateTime(2008, 6, 12).LastDayOfMonth(DayOfWeek.Thursday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Friday where the last day of month falls on a Monday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest26()
    Assert.AreEqual(New DateTime(2008, 6, 27), New DateTime(2008, 6, 12).LastDayOfMonth(DayOfWeek.Friday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Saturday where the last day of month falls on a Monday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest27()
    Assert.AreEqual(New DateTime(2008, 6, 28), New DateTime(2008, 6, 12).LastDayOfMonth(DayOfWeek.Saturday))
  End Sub

#End Region

#Region " last day of month falls on Tuesday"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Sunday where the last day of month falls on a Tuesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest31()
    Assert.AreEqual(New DateTime(2008, 9, 28), New DateTime(2008, 9, 12).LastDayOfMonth(DayOfWeek.Sunday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Monday where the last day of month falls on a Tuesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest32()
    Assert.AreEqual(New DateTime(2008, 9, 29), New DateTime(2008, 9, 12).LastDayOfMonth(DayOfWeek.Monday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Tuesday where the last day of month falls on a Tuesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest33()
    Assert.AreEqual(New DateTime(2008, 9, 30), New DateTime(2008, 9, 12).LastDayOfMonth(DayOfWeek.Tuesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Wednesday where the last day of month falls on a Tuesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest34()
    Assert.AreEqual(New DateTime(2008, 9, 24), New DateTime(2008, 9, 12).LastDayOfMonth(DayOfWeek.Wednesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Thursday where the last day of month falls on a Tuesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest35()
    Assert.AreEqual(New DateTime(2008, 9, 25), New DateTime(2008, 9, 12).LastDayOfMonth(DayOfWeek.Thursday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Friday where the last day of month falls on a Tuesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest36()
    Assert.AreEqual(New DateTime(2008, 9, 26), New DateTime(2008, 9, 12).LastDayOfMonth(DayOfWeek.Friday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Saturday where the last day of month falls on a Tuesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest37()
    Assert.AreEqual(New DateTime(2008, 9, 27), New DateTime(2008, 9, 12).LastDayOfMonth(DayOfWeek.Saturday))
  End Sub

#End Region

#Region " last day of month falls on Wednesday"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Sunday where the last day of month falls on a Wednesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest41()
    Assert.AreEqual(New DateTime(2008, 12, 28), New DateTime(2008, 12, 12).LastDayOfMonth(DayOfWeek.Sunday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Monday where the last day of month falls on a Wednesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest42()
    Assert.AreEqual(New DateTime(2008, 12, 29), New DateTime(2008, 12, 12).LastDayOfMonth(DayOfWeek.Monday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Tuesday where the last day of month falls on a Wednesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest43()
    Assert.AreEqual(New DateTime(2008, 12, 30), New DateTime(2008, 12, 12).LastDayOfMonth(DayOfWeek.Tuesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Wednesday where the last day of month falls on a Wednesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest44()
    Assert.AreEqual(New DateTime(2008, 12, 31), New DateTime(2008, 12, 12).LastDayOfMonth(DayOfWeek.Wednesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Thursday where the last day of month falls on a Wednesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest45()
    Assert.AreEqual(New DateTime(2008, 12, 25), New DateTime(2008, 12, 12).LastDayOfMonth(DayOfWeek.Thursday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Friday where the last day of month falls on a Wednesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest46()
    Assert.AreEqual(New DateTime(2008, 12, 26), New DateTime(2008, 12, 12).LastDayOfMonth(DayOfWeek.Friday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Saturday where the last day of month falls on a Wednesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest47()
    Assert.AreEqual(New DateTime(2008, 12, 27), New DateTime(2008, 12, 12).LastDayOfMonth(DayOfWeek.Saturday))
  End Sub

#End Region

#Region " last day of month falls on Thursday"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Sunday where the last day of month falls on a Thursday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest51()
    Assert.AreEqual(New DateTime(2008, 7, 27), New DateTime(2008, 7, 12).LastDayOfMonth(DayOfWeek.Sunday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Monday where the last day of month falls on a Thursday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest52()
    Assert.AreEqual(New DateTime(2008, 7, 28), New DateTime(2008, 7, 12).LastDayOfMonth(DayOfWeek.Monday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Tuesday where the last day of month falls on a Thursday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest53()
    Assert.AreEqual(New DateTime(2008, 7, 29), New DateTime(2008, 7, 12).LastDayOfMonth(DayOfWeek.Tuesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Wednesday where the last day of month falls on a Thursday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest54()
    Assert.AreEqual(New DateTime(2008, 7, 30), New DateTime(2008, 7, 12).LastDayOfMonth(DayOfWeek.Wednesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Thursday where the last day of month falls on a Thursday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest55()
    Assert.AreEqual(New DateTime(2008, 7, 31), New DateTime(2008, 7, 12).LastDayOfMonth(DayOfWeek.Thursday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Friday where the last day of month falls on a Thursday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest56()
    Assert.AreEqual(New DateTime(2008, 7, 25), New DateTime(2008, 7, 12).LastDayOfMonth(DayOfWeek.Friday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Saturday where the last day of month falls on a Thursday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest57()
    Assert.AreEqual(New DateTime(2008, 7, 26), New DateTime(2008, 7, 12).LastDayOfMonth(DayOfWeek.Saturday))
  End Sub

#End Region

#Region " last day of month falls on Friday"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Sunday where the last day of month falls on a Friday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest61()
    Assert.AreEqual(New DateTime(2008, 10, 26), New DateTime(2008, 10, 12).LastDayOfMonth(DayOfWeek.Sunday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Monday where the last day of month falls on a Friday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest62()
    Assert.AreEqual(New DateTime(2008, 10, 27), New DateTime(2008, 10, 12).LastDayOfMonth(DayOfWeek.Monday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Tuesday where the last day of month falls on a Friday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest63()
    Assert.AreEqual(New DateTime(2008, 10, 28), New DateTime(2008, 10, 12).LastDayOfMonth(DayOfWeek.Tuesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Wednesday where the last day of month falls on a Friday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest64()
    Assert.AreEqual(New DateTime(2008, 10, 29), New DateTime(2008, 10, 12).LastDayOfMonth(DayOfWeek.Wednesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Thursday where the last day of month falls on a Friday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest65()
    Assert.AreEqual(New DateTime(2008, 10, 30), New DateTime(2008, 10, 12).LastDayOfMonth(DayOfWeek.Thursday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Friday where the last day of month falls on a Friday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest66()
    Assert.AreEqual(New DateTime(2008, 10, 31), New DateTime(2008, 10, 12).LastDayOfMonth(DayOfWeek.Friday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Saturday where the last day of month falls on a Friday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest67()
    Assert.AreEqual(New DateTime(2008, 10, 25), New DateTime(2008, 10, 12).LastDayOfMonth(DayOfWeek.Saturday))
  End Sub

#End Region

#Region " last day of month falls on Saturday"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Sunday where the last day of month falls on a Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest71()
    Assert.AreEqual(New DateTime(2008, 5, 25), New DateTime(2008, 5, 12).LastDayOfMonth(DayOfWeek.Sunday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Monday where the last day of month falls on a Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest72()
    Assert.AreEqual(New DateTime(2008, 5, 26), New DateTime(2008, 5, 12).LastDayOfMonth(DayOfWeek.Monday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Tuesday where the last day of month falls on a Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest73()
    Assert.AreEqual(New DateTime(2008, 5, 27), New DateTime(2008, 5, 12).LastDayOfMonth(DayOfWeek.Tuesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Wednesday where the last day of month falls on a Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest74()
    Assert.AreEqual(New DateTime(2008, 5, 28), New DateTime(2008, 5, 12).LastDayOfMonth(DayOfWeek.Wednesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Thursday where the last day of month falls on a Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest75()
    Assert.AreEqual(New DateTime(2008, 5, 29), New DateTime(2008, 5, 12).LastDayOfMonth(DayOfWeek.Thursday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Friday where the last day of month falls on a Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest76()
    Assert.AreEqual(New DateTime(2008, 5, 30), New DateTime(2008, 5, 12).LastDayOfMonth(DayOfWeek.Friday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastDayOfMonth">LastDayOfMonth</see> method specifying Saturday where the last day of month falls on a Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastDayOfMonthTest77()
    Assert.AreEqual(New DateTime(2008, 5, 31), New DateTime(2008, 5, 12).LastDayOfMonth(DayOfWeek.Saturday))
  End Sub

#End Region


#End Region

#Region " LastCalendarDayOfPreviousFiscalYear"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastCalendarDayOfPreviousFiscalYear">LastCalendarDayOfPreviousFiscalYear</see> method.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastCalendarDayOfPreviousFiscalYearTest()
    Assert.AreEqual(New DateTime(2007, 9, 30), New DateTime(2008, 6, 12).LastCalendarDayOfPreviousFiscalYear)
  End Sub

#End Region

#Region " LastCalendarDayOfCurrentFiscalYear"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.LastCalendarDayOfCurrentFiscalYear">LastCalendarDayOfCurrentFiscalYear</see> method.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub LastCalendarDayOfCurrentFiscalYearTest()
    Assert.AreEqual(New DateTime(2008, 9, 30), New DateTime(2008, 6, 12).LastCalendarDayOfCurrentFiscalYear)
  End Sub

#End Region

#Region " JulianDate"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.JulianDate">JulianDate</see> method specifying a date in the first 10 days of the year.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub JulianDateTest1()
    Assert.AreEqual("2008003", New DateTime(2008, 1, 3).JulianDate)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.JulianDate">JulianDate</see> method specifying a date after the first 10 days but before in the first 100 days of the year.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub JulianDateTest2()
    Assert.AreEqual("2008010", New DateTime(2008, 1, 10).JulianDate)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.JulianDate">JulianDate</see> method specifying a date after the first 100 days of the year.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub JulianDateTest3()
    Assert.AreEqual("2008121", New DateTime(2008, 4, 30).JulianDate)
  End Sub

#End Region

#Region " IsLeapYear"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.IsLeapYear">IsLeapYear</see> method specifying a leap year.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub IsLeapYearTest1()
    Assert.IsTrue(New DateTime(2008, 6, 12).IsLeapYear)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.IsLeapYear">IsLeapYear</see> method specifying a year that is not a leap year.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub IsLeapYearTest2()
    Assert.IsFalse(New DateTime(2007, 6, 12).IsLeapYear)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.IsLeapYear">IsLeapYear</see> method specyfing a year that is divisible by 400 (meaning that it is a leap year).
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub IsLeapYearTest3()
    Assert.IsTrue(New DateTime(1600, 6, 12).IsLeapYear)
  End Sub

#End Region

#Region " FiscalYear"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FiscalYear">FiscalYear</see> method specyfing a date before October 1.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FiscalYearTest1()
    Assert.AreEqual(Convert.ToInt16(2008), New DateTime(2008, 6, 12).FiscalYear)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FiscalYear">FiscalYear</see> method specifying a date after October 1.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FiscalYearTest2()
    Assert.AreEqual(Convert.ToInt16(2009), New DateTime(2008, 12, 12).FiscalYear)
  End Sub

#End Region

#Region " FirstWorkDayOfPreviousFiscalYear"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstWorkDayOfPreviousFiscalYear">FirstWorkDayOfPreviousFiscalYear</see> method where the first calenadar day of the fiscal year falls on a Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstWorkDayOfPreviousFiscalYearTest1()
    Assert.AreEqual(New DateTime(2006, 10, 2), New DateTime(2008, 6, 12).FirstWorkDayOfPreviousFiscalYear)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstWorkDayOfPreviousFiscalYear">FirstWorkDayOfPreviousFiscalYear</see> method where the first calenadar day of the fiscal year falls on a Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstWorkDayOfPreviousFiscalYearTest2()
    Assert.AreEqual(New DateTime(2011, 10, 3), New DateTime(2014, 6, 12).FirstWorkDayOfPreviousFiscalYear)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstWorkDayOfPreviousFiscalYear">FirstWorkDayOfPreviousFiscalYear</see> method where the first calenadar day of the fiscal year does not fall on a Sunday or Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstWorkDayOfPreviousFiscalYearTest3()
    Assert.AreEqual(New DateTime(2010, 10, 1), New DateTime(2013, 6, 12).FirstWorkDayOfPreviousFiscalYear)
  End Sub

#End Region

#Region " FirstWorkDayOfCurrentFiscalYear"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstWorkDayOfCurrentFiscalYear">FirstWorkDayOfCurrentFiscalYear</see> method where the calendar day does not fall on either Saturday or Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstWorkDayOfCurrentFiscalYearTest1()
    Assert.AreEqual(New DateTime(2007, 10, 1), New DateTime(2008, 6, 12).FirstWorkDayOfCurrentFiscalYear)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstWorkDayOfCurrentFiscalYear">FirstWorkDayOfCurrentFiscalYear</see> method where the calendar day falls on either Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstWorkDayOfCurrentFiscalYearTest2()
    Assert.AreEqual(New DateTime(2011, 10, 3), New DateTime(2012, 6, 12).FirstWorkDayOfCurrentFiscalYear)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstWorkDayOfCurrentFiscalYear">FirstWorkDayOfCurrentFiscalYear</see> method where the calendar day falls on either Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstWorkDayOfCurrentFiscalYearTest3()
    Assert.AreEqual(New DateTime(2017, 10, 2), New DateTime(2018, 6, 12).FirstWorkDayOfCurrentFiscalYear)
  End Sub

#End Region

#Region " FirstDayOfWeek"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfWeek">FirstDayOfWeek</see> method specifying a date that falls on Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfWeekTest1()
    Assert.AreEqual(New DateTime(2008, 6, 8), New DateTime(2008, 6, 8).FirstDayOfWeek)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfWeek">FirstDayOfWeek</see> method specifying a date that falls on Monday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfWeekTest2()
    Assert.AreEqual(New DateTime(2008, 6, 8), New DateTime(2008, 6, 9).FirstDayOfWeek)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfWeek">FirstDayOfWeek</see> method specifying a date that falls on Tuesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfWeekTest3()
    Assert.AreEqual(New DateTime(2008, 6, 8), New DateTime(2008, 6, 10).FirstDayOfWeek)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfWeek">FirstDayOfWeek</see> method specifying a date that falls on Wednesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfWeekTest4()
    Assert.AreEqual(New DateTime(2008, 6, 8), New DateTime(2008, 6, 11).FirstDayOfWeek)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfWeek">FirstDayOfWeek</see> method specifying a date that falls on Thursday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfWeekTest5()
    Assert.AreEqual(New DateTime(2008, 6, 8), New DateTime(2008, 6, 12).FirstDayOfWeek)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfWeek">FirstDayOfWeek</see> method specifying a date that falls on Friday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfWeekTest6()
    Assert.AreEqual(New DateTime(2008, 6, 8), New DateTime(2008, 6, 13).FirstDayOfWeek)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfWeek">FirstDayOfWeek</see> method specifying a date that falls on Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfWeekTest7()
    Assert.AreEqual(New DateTime(2008, 6, 8), New DateTime(2008, 6, 14).FirstDayOfWeek)
  End Sub

#End Region

#Region " FirstDayOfPreviousQuarter"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfPreviousQuarter">FirstDayOfPreviousQuarter</see> method where a date in the first quarter of the calendar year is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfPreviousQuarterTest1()
    Assert.AreEqual(New DateTime(2007, 10, 1), New DateTime(2008, 2, 12).FirstDayOfPreviousQuarter)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfPreviousQuarter">FirstDayOfPreviousQuarter</see> method where a date in the second quarter of the calendar year is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfPreviousQuarterTest2()
    Assert.AreEqual(New DateTime(2008, 1, 1), New DateTime(2008, 5, 12).FirstDayOfPreviousQuarter)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfPreviousQuarter">FirstDayOfPreviousQuarter</see> method where a date in the third quarter of the calendar year is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfPreviousQuarterTest3()
    Assert.AreEqual(New DateTime(2008, 4, 1), New DateTime(2008, 8, 12).FirstDayOfPreviousQuarter)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfPreviousQuarter">FirstDayOfPreviousQuarter</see> method where a date in the fourth quarter of the calendar year is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfPreviousQuarterTest4()
    Assert.AreEqual(New DateTime(2008, 7, 1), New DateTime(2008, 11, 12).FirstDayOfPreviousQuarter)
  End Sub

#End Region

#Region " FirstDayOfMonth"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method without specifying the day of week.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest1()
    Assert.AreEqual(New DateTime(2008, 6, 1), New DateTime(2008, 6, 12).FirstDayOfMonth)
  End Sub

#Region " First day of month falls on Sunday"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Sunday where the first day of month falls on a Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest11()
    Assert.AreEqual(New DateTime(2008, 6, 1), New DateTime(2008, 6, 12).FirstDayOfMonth(DayOfWeek.Sunday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Monday where the first day of month falls on a Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest12()
    Assert.AreEqual(New DateTime(2008, 6, 2), New DateTime(2008, 6, 12).FirstDayOfMonth(DayOfWeek.Monday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Tuesday where the first day of month falls on a Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest13()
    Assert.AreEqual(New DateTime(2008, 6, 3), New DateTime(2008, 6, 12).FirstDayOfMonth(DayOfWeek.Tuesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Wednesday where the first day of month falls on a Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest14()
    Assert.AreEqual(New DateTime(2008, 6, 4), New DateTime(2008, 6, 12).FirstDayOfMonth(DayOfWeek.Wednesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Thursday where the first day of month falls on a Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest15()
    Assert.AreEqual(New DateTime(2008, 6, 5), New DateTime(2008, 6, 12).FirstDayOfMonth(DayOfWeek.Thursday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Friday where the first day of month falls on a Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest16()
    Assert.AreEqual(New DateTime(2008, 6, 6), New DateTime(2008, 6, 12).FirstDayOfMonth(DayOfWeek.Friday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Saturday where the first day of month falls on a Sunday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest17()
    Assert.AreEqual(New DateTime(2008, 6, 7), New DateTime(2008, 6, 12).FirstDayOfMonth(DayOfWeek.Saturday))
  End Sub

#End Region

#Region " First day of month falls on Monday"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Sunday where the first day of month falls on a Monday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest21()
    Assert.AreEqual(New DateTime(2008, 9, 7), New DateTime(2008, 9, 12).FirstDayOfMonth(DayOfWeek.Sunday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Monday where the first day of month falls on a Monday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest22()
    Assert.AreEqual(New DateTime(2008, 9, 1), New DateTime(2008, 9, 12).FirstDayOfMonth(DayOfWeek.Monday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Tuesday where the first day of month falls on a Monday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest23()
    Assert.AreEqual(New DateTime(2008, 9, 2), New DateTime(2008, 9, 12).FirstDayOfMonth(DayOfWeek.Tuesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Wednesday where the first day of month falls on a Monday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest24()
    Assert.AreEqual(New DateTime(2008, 9, 3), New DateTime(2008, 9, 12).FirstDayOfMonth(DayOfWeek.Wednesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Thursday where the first day of month falls on a Monday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest25()
    Assert.AreEqual(New DateTime(2008, 9, 4), New DateTime(2008, 9, 12).FirstDayOfMonth(DayOfWeek.Thursday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Friday where the first day of month falls on a Monday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest26()
    Assert.AreEqual(New DateTime(2008, 9, 5), New DateTime(2008, 9, 12).FirstDayOfMonth(DayOfWeek.Friday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Saturday where the first day of month falls on a Monday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest27()
    Assert.AreEqual(New DateTime(2008, 9, 6), New DateTime(2008, 9, 12).FirstDayOfMonth(DayOfWeek.Saturday))
  End Sub

#End Region

#Region " First day of month falls on Tuesday"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Sunday where the first day of month falls on a Tuesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest31()
    Assert.AreEqual(New DateTime(2008, 7, 6), New DateTime(2008, 7, 12).FirstDayOfMonth(DayOfWeek.Sunday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Monday where the first day of month falls on a Tuesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest32()
    Assert.AreEqual(New DateTime(2008, 7, 7), New DateTime(2008, 7, 12).FirstDayOfMonth(DayOfWeek.Monday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Tuesday where the first day of month falls on a Tuesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest33()
    Assert.AreEqual(New DateTime(2008, 7, 1), New DateTime(2008, 7, 12).FirstDayOfMonth(DayOfWeek.Tuesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Wednesday where the first day of month falls on a Tuesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest34()
    Assert.AreEqual(New DateTime(2008, 7, 2), New DateTime(2008, 7, 12).FirstDayOfMonth(DayOfWeek.Wednesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Thursday where the first day of month falls on a Tuesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest35()
    Assert.AreEqual(New DateTime(2008, 7, 3), New DateTime(2008, 7, 12).FirstDayOfMonth(DayOfWeek.Thursday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Friday where the first day of month falls on a Tuesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest36()
    Assert.AreEqual(New DateTime(2008, 7, 4), New DateTime(2008, 7, 12).FirstDayOfMonth(DayOfWeek.Friday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Saturday where the first day of month falls on a Tuesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest37()
    Assert.AreEqual(New DateTime(2008, 7, 5), New DateTime(2008, 7, 12).FirstDayOfMonth(DayOfWeek.Saturday))
  End Sub

#End Region

#Region " First day of month falls on Wednesday"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Sunday where the first day of month falls on a Wednesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest41()
    Assert.AreEqual(New DateTime(2008, 10, 5), New DateTime(2008, 10, 12).FirstDayOfMonth(DayOfWeek.Sunday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Monday where the first day of month falls on a Wednesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest42()
    Assert.AreEqual(New DateTime(2008, 10, 6), New DateTime(2008, 10, 12).FirstDayOfMonth(DayOfWeek.Monday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Tuesday where the first day of month falls on a Wednesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest43()
    Assert.AreEqual(New DateTime(2008, 10, 7), New DateTime(2008, 10, 12).FirstDayOfMonth(DayOfWeek.Tuesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Wednesday where the first day of month falls on a Wednesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest44()
    Assert.AreEqual(New DateTime(2008, 10, 1), New DateTime(2008, 10, 12).FirstDayOfMonth(DayOfWeek.Wednesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Thursday where the first day of month falls on a Wednesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest45()
    Assert.AreEqual(New DateTime(2008, 10, 2), New DateTime(2008, 10, 12).FirstDayOfMonth(DayOfWeek.Thursday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Friday where the first day of month falls on a Wednesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest46()
    Assert.AreEqual(New DateTime(2008, 10, 3), New DateTime(2008, 10, 12).FirstDayOfMonth(DayOfWeek.Friday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Saturday where the first day of month falls on a Wednesday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest47()
    Assert.AreEqual(New DateTime(2008, 10, 4), New DateTime(2008, 10, 12).FirstDayOfMonth(DayOfWeek.Saturday))
  End Sub

#End Region

#Region " First day of month falls on Thursday"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Sunday where the first day of month falls on a Thursday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest51()
    Assert.AreEqual(New DateTime(2008, 5, 4), New DateTime(2008, 5, 12).FirstDayOfMonth(DayOfWeek.Sunday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Monday where the first day of month falls on a Thursday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest52()
    Assert.AreEqual(New DateTime(2008, 5, 5), New DateTime(2008, 5, 12).FirstDayOfMonth(DayOfWeek.Monday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Tuesday where the first day of month falls on a Thursday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest53()
    Assert.AreEqual(New DateTime(2008, 5, 6), New DateTime(2008, 5, 12).FirstDayOfMonth(DayOfWeek.Tuesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Wednesday where the first day of month falls on a Thursday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest54()
    Assert.AreEqual(New DateTime(2008, 5, 7), New DateTime(2008, 5, 12).FirstDayOfMonth(DayOfWeek.Wednesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Thursday where the first day of month falls on a Thursday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest55()
    Assert.AreEqual(New DateTime(2008, 5, 1), New DateTime(2008, 5, 12).FirstDayOfMonth(DayOfWeek.Thursday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Friday where the first day of month falls on a Thursday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest56()
    Assert.AreEqual(New DateTime(2008, 5, 2), New DateTime(2008, 5, 12).FirstDayOfMonth(DayOfWeek.Friday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Saturday where the first day of month falls on a Thursday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest57()
    Assert.AreEqual(New DateTime(2008, 5, 3), New DateTime(2008, 5, 12).FirstDayOfMonth(DayOfWeek.Saturday))
  End Sub

#End Region

#Region " First day of month falls on Friday"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Sunday where the first day of month falls on a Friday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest61()
    Assert.AreEqual(New DateTime(2008, 2, 3), New DateTime(2008, 2, 12).FirstDayOfMonth(DayOfWeek.Sunday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Monday where the first day of month falls on a Friday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest62()
    Assert.AreEqual(New DateTime(2008, 2, 4), New DateTime(2008, 2, 12).FirstDayOfMonth(DayOfWeek.Monday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Tuesday where the first day of month falls on a Friday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest63()
    Assert.AreEqual(New DateTime(2008, 2, 5), New DateTime(2008, 2, 12).FirstDayOfMonth(DayOfWeek.Tuesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Wednesday where the first day of month falls on a Friday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest64()
    Assert.AreEqual(New DateTime(2008, 2, 6), New DateTime(2008, 2, 12).FirstDayOfMonth(DayOfWeek.Wednesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Thursday where the first day of month falls on a Friday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest65()
    Assert.AreEqual(New DateTime(2008, 2, 7), New DateTime(2008, 2, 12).FirstDayOfMonth(DayOfWeek.Thursday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Friday where the first day of month falls on a Friday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest66()
    Assert.AreEqual(New DateTime(2008, 2, 1), New DateTime(2008, 2, 12).FirstDayOfMonth(DayOfWeek.Friday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Saturday where the first day of month falls on a Friday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest67()
    Assert.AreEqual(New DateTime(2008, 2, 2), New DateTime(2008, 2, 12).FirstDayOfMonth(DayOfWeek.Saturday))
  End Sub

#End Region

#Region " First day of month falls on Saturday"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Sunday where the first day of month falls on a Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest71()
    Assert.AreEqual(New DateTime(2008, 3, 2), New DateTime(2008, 3, 12).FirstDayOfMonth(DayOfWeek.Sunday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Monday where the first day of month falls on a Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest72()
    Assert.AreEqual(New DateTime(2008, 3, 3), New DateTime(2008, 3, 12).FirstDayOfMonth(DayOfWeek.Monday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Tuesday where the first day of month falls on a Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest73()
    Assert.AreEqual(New DateTime(2008, 3, 4), New DateTime(2008, 3, 12).FirstDayOfMonth(DayOfWeek.Tuesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Wednesday where the first day of month falls on a Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest74()
    Assert.AreEqual(New DateTime(2008, 3, 5), New DateTime(2008, 3, 12).FirstDayOfMonth(DayOfWeek.Wednesday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Thursday where the first day of month falls on a Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest75()
    Assert.AreEqual(New DateTime(2008, 3, 6), New DateTime(2008, 3, 12).FirstDayOfMonth(DayOfWeek.Thursday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Friday where the first day of month falls on a Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest76()
    Assert.AreEqual(New DateTime(2008, 3, 7), New DateTime(2008, 3, 12).FirstDayOfMonth(DayOfWeek.Friday))
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfMonth">FirstDayOfMonth</see> method specifying Saturday where the first day of month falls on a Saturday.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfMonthTest77()
    Assert.AreEqual(New DateTime(2008, 3, 1), New DateTime(2008, 3, 12).FirstDayOfMonth(DayOfWeek.Saturday))
  End Sub

#End Region

#End Region

#Region " FirstDayOfCurrentQuarter"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfCurrentQuarter">FirstDayOfCurrentQuarter</see> method where a date in the first quarter of the calendar year is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfCurrentQuarterTest1()
    Assert.AreEqual(New DateTime(2008, 1, 1), New DateTime(2008, 2, 12).FirstDayOfCurrentQuarter)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfCurrentQuarter">FirstDayOfCurrentQuarter</see> method where a date in the second quarter of the calendar year is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfCurrentQuarterTest2()
    Assert.AreEqual(New DateTime(2008, 4, 1), New DateTime(2008, 5, 12).FirstDayOfCurrentQuarter)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfCurrentQuarter">FirstDayOfCurrentQuarter</see> method where a date in the third quarter of the calendar year is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfCurrentQuarterTest3()
    Assert.AreEqual(New DateTime(2008, 7, 1), New DateTime(2008, 8, 12).FirstDayOfCurrentQuarter)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstDayOfCurrentQuarter">FirstDayOfCurrentQuarter</see> method where a date in the fourth quarter of the calendar year is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstDayOfCurrentQuarterTest4()
    Assert.AreEqual(New DateTime(2008, 10, 1), New DateTime(2008, 11, 12).FirstDayOfCurrentQuarter)
  End Sub

#End Region

#Region " FirstCalendarDayOfPreviousFiscalYear"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstCalendarDayOfPreviousFiscalYear">FirstCalendarDayOfPreviousFiscalYear</see> method where the fiscal year and calendar year are different.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  ''' 
  <TestMethod()> Public Sub FirstCalendarDayOfPreviousFiscalYearTest1()
    Assert.AreEqual(New DateTime(2006, 10, 1), New DateTime(2008, 6, 12).FirstCalendarDayOfPreviousFiscalYear)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstCalendarDayOfPreviousFiscalYear">FirstCalendarDayOfPreviousFiscalYear</see> method where the fiscal year and calendar year are the same.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  ''' 
  <TestMethod()> Public Sub FirstCalendarDayOfPreviousFiscalYearTest2()
    Assert.AreEqual(New DateTime(2004, 10, 1), New DateTime(2006, 11, 12).FirstCalendarDayOfPreviousFiscalYear)
  End Sub

#End Region

#Region " FirstCalendarDayOfCurrentFiscalYear"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.FirstCalendarDayOfCurrentFiscalYear">FirstCalendarDayOfCurrentFiscalYear</see> method.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub FirstCalendarDayOfCurrentFiscalYearTest()
    Assert.AreEqual(New DateTime(2007, 10, 1), New DateTime(2008, 6, 12).FirstCalendarDayOfCurrentFiscalYear)
  End Sub

#End Region

#Region " EndOfDay"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.EndOfDay">EndOfDay</see> method.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub EndOfDayTest()
    Assert.AreEqual(New DateTime(2008, 6, 12, 23, 59, 59), New DateTime(2008, 6, 12).EndOfDay)
  End Sub

#End Region

#Region " Age"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.Age">Age</see> method where the month is before the current month
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub AgeTest1()
    Assert.AreEqual(Convert.ToInt16(2), DateAdd(DateInterval.Month, -25, Now).Age)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.Age">Age</see> method where the date is prior to the current date.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub AgeTest2()
    Assert.AreEqual(Convert.ToInt16(2), DateAdd(DateInterval.Year, -2, Now).Age)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.Age">Age</see> method where the date is after the current date.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub AgeTest3()
    Assert.AreEqual(Convert.ToInt16(0), DateAdd(DateInterval.Day, 1, Now).Age)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.Age">Age</see> method where the date is prior to the current date.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub AgeTest4()
    Assert.AreEqual(Convert.ToInt16(1), DateAdd(DateInterval.Day, 1, DateAdd(DateInterval.Year, -2, Now)).Age)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.Age">Age</see> method where the date is prior to the current date.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub AgeTest5()
    Assert.AreEqual(Convert.ToInt16(1), DateAdd(DateInterval.Month, 1, DateAdd(DateInterval.Year, -2, Now)).Age)
  End Sub

#End Region

#Region " Age2"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.Age">Age</see> method where the month is before the current month
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub Age2Test1()
    Assert.AreEqual(Convert.ToInt16(2), DateAdd(DateInterval.Month, -25, Now).Age2)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.Age">Age</see> method where the date is prior to the current date.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub Age2Test2()
    Assert.AreEqual(Convert.ToInt16(2), DateAdd(DateInterval.Year, -2, Now).Age2)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.Age">Age</see> method where the date is after the current date.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub Age2Test3()
    Assert.AreEqual(Convert.ToInt16(-1), DateAdd(DateInterval.Day, 1, Now).Age2)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.Age">Age</see> method where the date is prior to the current date.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub Age2Test4()
    Assert.AreEqual(Convert.ToInt16(1), DateAdd(DateInterval.Day, 1, DateAdd(DateInterval.Year, -2, Now)).Age2)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.Age">Age</see> method where the date is prior to the current date.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub Age2Test5()
    Assert.AreEqual(Convert.ToInt16(1), DateAdd(DateInterval.Month, 1, DateAdd(DateInterval.Year, -2, Now)).Age2)
  End Sub

#End Region

#Region " AddWeek"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.AddWeek">AddWeek</see> method without specifying the number of weeks to add.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub AddWeekTest1()
    Assert.AreEqual(New DateTime(2008, 6, 19, 0, 0, 0), New DateTime(2008, 6, 12).AddWeek)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.AddWeek">AddWeek</see> method specifying the number of weeks to add.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub AddWeekTest2()
    Assert.AreEqual(New DateTime(2008, 6, 26, 0, 0, 0), New DateTime(2008, 6, 12).AddWeek(2))
  End Sub

#End Region

#Region " AddMonth"

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.AddMonth">AddMonth</see> method when a date in January in a leap year (after the 29th) is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub AddMonthTest1()
    Assert.AreEqual(New DateTime(2008, 2, 29), New DateTime(2008, 1, 30).AddMonth)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.AddMonth">AddMonth</see> method when a date in January in a non-leap year (after the 28th) is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub AddMonthTest2()
    Assert.AreEqual(New DateTime(2007, 2, 28), New DateTime(2007, 1, 30).AddMonth)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.AddMonth">AddMonth</see> method when a date in January (before the 28th) is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub AddMonthTest3()
    Assert.AreEqual(New DateTime(2008, 2, 15), New DateTime(2008, 1, 15).AddMonth)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.AddMonth">AddMonth</see> method when a date in February is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub AddMonthTest4()
    Assert.AreEqual(New DateTime(2008, 3, 15), New DateTime(2008, 2, 15).AddMonth)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.AddMonth">AddMonth</see> method when a date after the 30th in a month with 31 days is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub AddMonthTest5()
    Assert.AreEqual(New DateTime(2008, 4, 30), New DateTime(2008, 3, 31).AddMonth)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.AddMonth">AddMonth</see> method when a date before the 31st in a month with 31 days is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub AddMonthTest6()
    Assert.AreEqual(New DateTime(2008, 4, 15), New DateTime(2008, 3, 15).AddMonth)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.AddMonth">AddMonth</see> method when a date in a month with 30 days is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub AddMonthTest7()
    Assert.AreEqual(New DateTime(2008, 5, 15), New DateTime(2008, 4, 15).AddMonth)
  End Sub

  ''' <summary>
  ''' Tests the <see cref="DateTimeExtensions.AddMonth">AddMonth</see> method when a date in December is specified.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub AddMonthTest8()
    Assert.AreEqual(New DateTime(2009, 1, 15), New DateTime(2008, 12, 15).AddMonth)
  End Sub

#End Region

#Region " DaysSince"

  ''' <summary>
  ''' Tests the <see cref="DaysSince">DaysSince</see> method.
  ''' </summary>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.00.000">Initial Development</revision>
  ''' </revisions>
  <TestMethod()> Public Sub DaysSinceTest()
    Dim dtTestValue As DateTime = DateAdd(DateInterval.Day, -100, Now)
    Assert.AreEqual(100, dtTestValue.DaysSince)
  End Sub

#End Region

#End Region

End Class